<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page function_haversine.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name">/src/functions/function_haversine.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Contains the Haversine function to compute distance between two points.</p>
<p class="description"><p>PHP Version 5</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Kevin Fodness &lt;<a href="mailto:kevin.fodness@gmail.com">kevin.fodness@gmail.com</a>&gt;</li>
				<li><span class="field">author:</span> Spencer Hakim &lt;<a href="mailto:hakims@rpi.edu">hakims@rpi.edu</a>&gt;</li>
				<li><span class="field">author:</span> Mike Pennisi &lt;<a href="mailto:mpennisi@andrew.cmu.edu">mpennisi@andrew.cmu.edu</a>&gt;</li>
				<li><span class="field">author:</span> Aaron Ryden &lt;<a href="mailto:aryden@gmail.com">aryden@gmail.com</a>&gt;</li>
				<li><span class="field">link:</span> <a href="http://code.google.com/p/buylocalopensourcerensselaer/">http://code.google.com/p/buylocalopensourcerensselaer/</a></li>
				<li><span class="field">license:</span> <a href="http://opensource.org/licenses/gpl-license.php">GNU Public License</a></li>
			</ul>
		
			</div>
</div>
		

	
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functionhaversine" id="functionhaversine"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">haversine</span> (line <span class="line-number">30</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The Haversine function to compute distance between two points.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The distance, in whatever unit was chosen.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">float</span>
		<span class="method-name">
			haversine
		</span>
					(<span class="var-type">float</span>&nbsp;<span class="var-name">$lat1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$lng1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$lat2</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$lng2</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$unit</span> = <span class="var-default">&#039;mi&#039;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$lat1</span><span class="var-description">: The latitude of the first point in degrees.</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$lng1</span><span class="var-description">: The longitude of the first point in degrees.</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$lat2</span><span class="var-description">: The latitude of the second point in degrees.</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$lng2</span><span class="var-description">: The longitude of the second point in degrees.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$unit</span><span class="var-description">: The unit of distance measurement (km or mi).</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Sat, 19 Dec 2009 19:45:21 -0500 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>